import {
  IsNotEmpty,
  IsObject,
  IsOptional,
  IsString,
  IsUrl,
} from "class-validator";

export class HTTPRequestDTO {
  @IsString()
  @IsUrl()
  @IsNotEmpty()
  readonly url: string;

  @IsObject()
  @IsOptional()
  readonly header?: object;

  @IsObject()
  @IsOptional()
  readonly headers?: any;

  @IsObject()
  @IsOptional()
  readonly data?: object;

  @IsObject()
  @IsOptional()
  readonly body?: any;

  @IsString()
  @IsOptional()
  readonly method?: string;
}
